//路由文件
import vueRouter from 'vue-router'

import home from './components/tabbar/home.vue'
import member from './components/tabbar/member.vue'
import search from './components/tabbar/search.vue'
import shopcar from './components/tabbar/shopcar.vue'
import newslist from './components/newslist/newslist.vue'
import newsinfo from './components/newslist/newsinfo.vue'


let router=new vueRouter({

    //配置路由规则
    routes:[
        {path:"/",redirect:"/home"},
        {path:"/home",component:home},
        {path:"/home/newslist",component:newslist},
        {path:"/home/newslist/newsinfo/:title",component:newsinfo},
        {path:"/member",component:member},
        {path:"/search",component:search},
        {path:"/shopcar",component:shopcar},
    ],


    //选中路由高亮，覆盖默认的路由高亮类:router-link-active
    linkActiveClass:'mui-active'
})

export default router